Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |saturating_to_f32

std/conv::|saturating_to_f32


Usage

|saturating_to_f32<T>(value)

Generics

◻ T: SaturatingToF32

Parameters

↳ value: T

Return

f32


Turns data into f32, saturating if needed.

This function makes a saturating and infaillible conversion to f32. If incoming data represents something not representable purely in f32, then the resulting value is set to the closest approximation possible.